local skel = fk.CreateSkill {
  name = "#lb__shiyue_dis",
}

Fk:loadTranslationTable {
  ["#lb__shiyue_dis"] = "诗约",
  ["#lb__shiyue_dis_1"] = "诗约：你可以弃置一张牌以令一名角色获得“逐火”，若其已拥有，改为令其选择一个未拥有的此牌点数对应“逐火”者的技能获得之直到其下回合结束",
  ["#lb__shiyue_dis_2"] = "诗约：你可以弃置%arg以令一名角色获得“逐火”，若其已拥有，改为令其从%arg2的%arg3中未拥有的技能选择一个获得之直到其下回合结束",
}

skel:addEffect("active", {
  prompt = function(self, player, selected_cards, selected_targets)
    local list = {
      ["A"] = {"lb__agelaiya", "lb__zhiming", "lb__fengci" },
      ["2"] = {"lb__tibao", "lb__jingsuo", "lb__zhijianr" },
      ["3"] = {"lb__nakexia", "lb__qiongli", "lb__lianjin" },
      ["4"] = {"lb__fengjin", "lb__fengxi", "lb__hongze" },
      ["5"] = {"lb__wandi", "lb__fayan" },
      ["6"] = {"lb__saifeier", "lb__shenjie", "lb__tianqi" },
      ["7"] = {"lb__xiadie", "lb__youfu" },
      ["8"] = {"lb__baie", "lb__lizhou", "lb__fushi" },
      ["9"] = {"lb__haiseyin", "lb__huqiu", "lb__huli" },
      ["10"] = {"lb__changyeyue", "lb__mengyin", "lb__kouji" },
      ["J"] = {"lb__danhengtenghuang", "lb__bishi", "lb__tongzhou" },
      ["Q"] = {"lb__kelvdela", "lb__shengbian" },
      ["K"] = {"lb__jiyikaituozhe", "lb__shuyi" }
    }
    if #selected_cards == 1 then
      local card = Fk:getCardById(selected_cards[1])
      local num = card:getNumberStr()
      if list[num] then
        local name, skills = list[num][1], {}
        for i = 2, #list[num], 1 do
          local skill = list[num][i]
          table.insert(skills, "〖".. Fk:translate(skill) .. "〗")
        end
        return "#lb__shiyue_dis_2:::" .. card:toLogString() .. ":" .. name .. ":" .. table.concat(skills, "、")
      end
    end
    return "#lb__shiyue_dis_1"
  end,
  card_filter = function(self, player, to_select, selected, selected_targets)
    return #selected == 0 and not player:prohibitDiscard(to_select)
  end,
  target_num = 0,
  feasible = function(self, player, selected, selected_cards, card)
    return #selected_cards == 1
  end,
})

return skel
